#ifndef SqList_H_INCLUDED
#define SqList_H_INCLUDED
#include<cstdlib>
#define SqList_INIT_SIZE  100
#define SqList_INCRMENT   10
#define Elem             int
#define OVERFLOW           -1
#define ERROR              -2
typedef struct{
    Elem* elem;
    size_t length;
    size_t listsize;
} SqList;

void initSqList(SqList&);
void destorySqList(SqList&);
void clearSqList(SqList&);
bool SqListEmpty(const SqList&);
size_t SqListLengh(const SqList&);
bool getElem(const SqList&,size_t,Elem&);
size_t locateElem(const SqList&,const Elem&,bool (*compare)(const Elem&,const Elem&));
bool priorElem(SqList&,const Elem&,Elem*);
bool nextElem(SqList&,const Elem&,Elem*);
bool insertElem(SqList&,size_t,const Elem&);
bool deleteElem(SqList&,size_t,Elem&);
void SqListTraverse(const SqList&,void (*visit)(const Elem&));


#endif // SqList_H_INCLUDED
